package com.feiyun.erp.service.impl;

import com.feiyun.erp.entity.Functions;
import com.feiyun.erp.mapper.FunctionsMapper;
import com.feiyun.erp.service.IFunctionsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xray
 * @since 2021-05-03
 */
@Service
public class FunctionsServiceImpl extends ServiceImpl<FunctionsMapper, Functions> implements IFunctionsService {

    @Autowired
    private FunctionsMapper functionsMapper;

    @Override
    public List<Functions> getAllFunctions() {
        return functionsMapper.selectAllFunctions();
    }

    @Override
    public List<Functions> getFunctionsByRoleId(String roleId) {
        return functionsMapper.selectFunctionsByRoleId(roleId);
    }
}
